package com.cgsd.heyu.widgets;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;

/**
 * @author xiaoxing
 * Description 说明
 * CreateData: 2020/11/14
 */
public class TouchRecyclerView extends RecyclerView {
    private boolean isFlog;

    public boolean isFlog() {
        return isFlog;
    }

    public void setFlog(boolean flog) {
        isFlog = flog;
    }

    public TouchRecyclerView(@NonNull Context context) {
        super(context);
    }

    public TouchRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public TouchRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public boolean onTouchEvent(MotionEvent e) {
        return isFlog;
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        return isFlog;
    }


    @Override
    public boolean onInterceptTouchEvent(MotionEvent e) {
        return isFlog;
    }
}
